package com.yougou.sub_server.utils;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
public class WriteUtils {
	Logger logger = LoggerFactory.getLogger(this.getClass());

	public void writeHtmlToDisk(String path, String content) {
		File file = new File(path);
		try {
			OutputStream outputStream = new FileOutputStream(file);
			outputStream.write(content.getBytes());
		} catch (IOException e) {
			logger.error(e.getMessage());
		}
	}
}
